<?php
	$args = array( 'numberposts' => 10, 'orderby' => 'rand', 'category' => 6 );
	$rand_posts = get_posts( $args );
 ?>
<?php get_header(); ?>
	
    <div class="main-content-inner global-width">
        
    	<aside class="one-third">
          	<?php get_sidebar(); ?>
    	</aside>
    	
    	<section class="contents two-third">
           
    		
            <section class="full-width">
            <!-- Four Widget Area Starts -->
            	<h1>What we offer</h1>
            	<ul class="offer-post">
                   <?php foreach( $rand_posts as $post ) : setup_postdata($post); ?>
            		<li class="half">
						<?php if(has_post_thumbnail($post->ID )) {
                              	$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); 
								$image = $image[0];
								if($image=="") $image="http://armchairweddingguru.co.uk/wp-content/uploads/2012/03/img.gif";
							  }
							  else
							  	$image="http://armchairweddingguru.co.uk/wp-content/uploads/2012/03/img.gif";
						?>

            			<a href="<?php the_permalink(); ?>"><img src="<?php echo $image;?>" alt="Image" class="full-width"></a>
            		    <p class="bold"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
            		    <p> <?php the_content(); ?></p>  
            		    <a href="<?php the_permalink(); ?>" class="button">Read More</a>
            		</li>
					<?php endforeach; ?>
            	</ul>
            	<div class="clear"></div>
            
            <!-- Four Widget Area Ends -->
            </section>
            
    	</section>   
    	     
    	<div class="clearfix"></div>
    </div>
  

<!-- Main Content Ends -->
</section>

<?php get_footer(); ?>